<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
    <!DOCTYPE html>
<html lang="en" class="app">
	<head>
		<meta charset="utf-8" />
		<link rel="stylesheet" href="<c:url value='/css/app.v2.css'></c:url>" type="text/css" />
</head>
<body>
						<section class="vbox">
							<section class="scrollable padder">
								<ul class="breadcrumb no-border no-radius b-b b-light pull-in">
									<li>
										<a href="index.html"><i class="fa fa-home"></i> 主页</a>
									</li>
									<li class="active">资料管理</li>
									<li class="active">文件信息管理</li>
								</ul>
								<div class="m-b-md">
									<h3 class="m-b-none">文件列表</h3>
								</div>

								<!--表单一 -->
								
								<section class="panel panel-default">
									<header class="panel-heading">文件列表</header>
									<div class="table-responsive">
										<table id="MyStretchGrid" class="table table-striped datagrid m-b-sm">
											<thead>
												<tr>
													<th>序号</th>
													<th>ID</th>
													<th>文件名称</th>
													<th>发布时间</th>
													<th>下载数</th>
													<th>删除</th>
												</tr>
											</thead>
											<tbody class="formtable">
											<c:forEach items="${fileList}" var="file" varStatus="status">
												<tr>
													<td>${status.index +1 }</td>
													<td>${file.id }</td>
													<td>${file.oriname }</td>
													<td>${file.uploaddate }</td>
													<td>${file.downloadcount }</td>
													<td>
														<a type="button" onclick="sureDeleteFile(${file.id});">
															<i class="fa fa-trash-o"></i>
														</a>
													</td>
												</tr>
											</c:forEach>
											</tbody>
										</table>
										<nav class="pull-right">
										  <ul class="pagination ">
										  	<li><a href="<c:url value='/fileSource/getFileList?pageId=1'></c:url>">首页</a></li>
										    <c:if test="${fsVO.currentPage > 1}">
										    	<li><a href="<c:url value='/fileSource/getFileList?pageId=${fsVO.currentPage -1}'></c:url>">上一页</a></li>
										    </c:if>
											<li><a href='<c:url value='/fileSource/getFileList?pageId=${fsVO.currentPage}'></c:url>'>${fsVO.currentPage }</a></li>
										    <c:if test="${fsVO.currentPage < fsVO.totalPage}">
										    	<li><a href="<c:url value='/fileSource/getFileList?pageId=${fsVO.currentPage +1}'></c:url>">下一页</a></li>
										    </c:if>
										    <li><a href="<c:url value='/fileSource/getFileList?pageId=${fsVO.totalPage}'></c:url>">尾页</a></li>
										     
										    <li>总页数：${fsVO.totalPage}</li>
										    <li>总记录数：${fsVO.totalCount}</li>
										  </ul>
										</nav>
									</div>
								</section>

							</section>
						</section>
						<a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen" data-target="#nav"></a>
					</section>
					<aside class="bg-light lter b-l aside-md hide" id="notes">
						<div class="wrapper">Notification</div>
					</aside>
				</section>
			</section>

		
		<script src="<c:url value='/js/jquery-3.1.0.min.js'></c:url>"></script>
		<script src="<c:url value='/js/app.v2.js'></c:url>"></script>
		<script src="<c:url value='/js/layer.js'></c:url>"></script>
		<script src="<c:url value='/js/fileList.js'></c:url>"></script>
</body>
</html>